package com.sample.security;

import java.security.NoSuchAlgorithmException;

public interface PasswordEncryptor {

	/**
	 * This is a one-way secure hash function. It is computationally impossible to derive the original
	 * password from the encoded String. So what we do is always convert from plain-text password to
	 * encoding and then store and compare the encoded forms.
	 * @param password
	 * @return
	 * @throws NoSuchAlgorithmException
	 */
	public abstract String encryptPassword(String password)
			throws NoSuchAlgorithmException;

}